﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace PrjAssessModels.BaseModels
{
    public class WorkItem : BaseEntity
    {
        [Required]
        [Display(Name = "项目编号")]
        public string PrjId { get; set; }

        [Required]
        [Display(Name = "分项内容")]
        public string ContentName { get; set; }

        [Required]
        [Display(Name = "数量")]
        public double Number { get; set; }

        [Required]
        [Display(Name = "单价")]
        public double Price { get; set; }


        [Display(Name = "小计")]
        public double PriceTotal
        {
            get
            {
                return this.Price * this.Number;
            }
        }

        [Required]
        [Display(Name = "预估次数")]
        public double PredictNo { get; set; }


        [Display(Name = "观测费用")]
        public double Sum
        {
            get
            {
                return this.PredictNo * this.PriceTotal;
            }
        }
    }
}
